"""
Reusable app header component to provide a consistent title/subtitle area.
"""

from kivy.uix.boxlayout import BoxLayout
from kivy.uix.label import Label
from kivy.uix.widget import Widget
from kivy.metrics import dp
from . import theme


class AppHeader(BoxLayout):
    def __init__(self, title="Local Smart Video Summary",
                 subtitle="Privacy • Offline • Open Source",
                 **kwargs):
        super().__init__(**kwargs)
        self.orientation = 'vertical'
        self.spacing = theme.SPACING / 2
        self.size_hint_y = None
        self.height = dp(140)

        # Title
        self.title_label = Label(
            text=title,
            font_size=dp(64),
            bold=True,
            color=theme.PRIMARY,
            size_hint_y=None,
            height=dp(80),
        )

        # Subtitle
        self.subtitle_label = Label(
            text=subtitle,
            font_size=theme.H2,
            color=theme.TEXT_MUTED,
            size_hint_y=None,
            height=dp(50),
        )

        self.add_widget(self.title_label)
        self.add_widget(self.subtitle_label)